<template>
  <div id="app">
    <One :data='test' @send='getData'></One><!--:data='test' 父传子的过程 --><!-- @send='getData'子传父的过程 -->
    <div>{{msg}}</div>
    <Two></Two>
    <Three></Three>
  </div>
</template>

<script>
import One from './components/one.vue'
import Two from './components/two.vue'
import Three from './components/three.vue'
export default {
  name: 'app',
  data () {
    return {
      //父传子的数据
      test:'父传子',
      msg:'',
    }
  },
  components:{
    One,
    Two,
    Three
  },
  methods:{
    /*子传父的接受过程*/
    getData:function(data){
      this.msg = data;
    }
  }
}
</script>
<style>
</style>
